Detecting Regularities on Grammar-Compressed Strings
نویسندگان
چکیده
We solve the problems of detecting and counting various forms of regularities in a string represented as a Straight Line Program (SLP). Given an SLP of size n that represents a string s of length N , our algorithm compute all runs and squares in s in O(nh) time and O(n) space, where h is the height of the derivation tree of the SLP. We also show an algorithm to compute all gapped-palindromes in O(nh+ gnh logN) time and O(n) space, where g is the length of the gap. The key technique of the above solution also allows us to compute the periods and covers of the string in O(nh) time and O(nh(n + log N)) time, respectively.
منابع مشابه
Algorithmics on SLP-compressed strings: A survey
Results on algorithmic problems on strings that are given in a compressed form via straightline programs are surveyed. A straight-line program is a context-free grammar that generates exactly one string. In this way, exponential compression rates can be achieved. Among others, we study pattern matching for compressed strings, membership problems for compressed strings in various kinds of formal...
متن کاملEquality Testing of Compressed Strings
This paper gives a survey on efficient algorithms for checking equality of grammar-compressed strings, i.e., strings that are represented succinctly by so called straight-line programs.
متن کاملOptimal Time Random Access to Grammar-Compressed Strings in Small Space
The random access problem for compressed strings is to build a data structure that efficiently supports accessing the character in position i of a string given in compressed form. Given a grammar of size n compressing a string of size N , we present a data structure using O(n∆ log∆ N n logN) bits of space that supports accessing position i in O(log∆ N) time for ∆ ≤ log O(1) N . The query time i...
متن کاملArtificial grammar learning in pigeons.
In two experiments, we developed a new methodology for studying complex stimulus control by spatial sequences of letters generated by artificial grammars. An artificial grammar is a system of rules that defines which letter sequences or strings are "grammatical." In Experiment 1, pigeons learned to respond differently to strings conforming to a grammar versus strings that were nongrammatical di...
متن کاملAlgorithms and data structures for grammar - compressed strings
This thesis presents new algorithms and data structures for handling data represented as grammar-compressed strings. The compression scheme we focus on is the Straight Line Program (SLP). In the following, S is an SLP of size n compressing a string S of size N . We consider the following problems. The q-gram profile of a compressed string. We present an algorithm for computing the q-gram profil...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Inf. Comput.
دوره 240 شماره
صفحات -
تاریخ انتشار 2013